package com.ruoyi.by.health.service.impl;

import com.ruoyi.by.health.domain.entity.ByhealthPrize;
import com.ruoyi.by.health.mapper.ByhealthPrizeMapper;
import com.ruoyi.by.health.service.IByhealthPrizeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @ClassName ByhealthPrizeServiceImp
 * @Author 张敬琦
 * @Description 添加描述
 * @Date 2024/1/18 00:58
 **/
@Service
public class ByhealthPrizeServiceImpl implements IByhealthPrizeService {

    @Autowired
    private ByhealthPrizeMapper prizeMapper;

    @Override
    public List<ByhealthPrize> getByhealthPrizeList() {
        return prizeMapper.selectAll();
    }

    @Override
    public List<ByhealthPrize> selectPrizeList(ByhealthPrize prize) {
        return prizeMapper.selectPrizeList(prize);
    }

    @Override
    public int insertPrize(ByhealthPrize prize) {
        return prizeMapper.insert(prize);
    }

    @Override
    public int updatePrize(ByhealthPrize prize) {
        return prizeMapper.updateByPrimaryKeySelective(prize);
    }

    @Override
    public int deletePrize(Long id) {
        return prizeMapper.deleteByPrimaryKey(id);
    }
}
